* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #333;
  background: #f5f7fa;
}

#app {
  height: 100%;
}

/* Element Plus 组件样式优化 */
/* 修改表头背景色为灰色 */
.el-table__header th {
  background-color: #f8f8f9 !important; /* 浅灰色背景 */
}
.el-table__header th,
.el-table__body td {
  text-align: center !important;
}

.el-card {
  border-radius: 8px;
  border: none;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.el-card:hover {
  box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.15);
}

.el-input {
  border-radius: 6px;
}

.el-menu {
  border-radius: 6px;
}

.el-menu-item {
  border-radius: 6px;
  /* margin: 2px 2px; */
}

.el-menu-item:hover {
  background-color: #f5f7fa !important;
}

.el-menu-item.is-active {
  background-color: #409eff !important;
  color: #fff !important;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 响应式工具类 */
.hidden-xs {
  display: block;
}

@media (max-width: 768px) {
  .hidden-xs {
    display: none;
  }
}

/* 动画类 */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

.slide-enter-active,
.slide-leave-active {
  transition: transform 0.3s ease;
}

.slide-enter-from {
  transform: translateX(-100%);
}

.slide-leave-to {
  transform: translateX(100%);
}

/* 全局加载样式 */
.global-loading .el-loading-spinner {
  top: 50%;
  margin-top: -21px;
  width: 100%;
  text-align: center;
}

.global-loading .el-loading-spinner .el-loading-text {
  color: #fff;
  margin: 3px 0;
}

.global-loading .el-loading-spinner .path {
  stroke: #409eff;
}

.global-loading .el-loading-spinner .el-loading-dot {
  background-color: #409eff;
}

/* 元素级别加载样式 */
.element-loading .el-loading-spinner {
  top: 50%;
  margin-top: -21px;
  width: 100%;
  text-align: center;
}

.element-loading .el-loading-spinner .el-loading-text {
  color: #606266;
  margin: 3px 0;
}

.element-loading .el-loading-spinner .path {
  stroke: #409eff;
}

.element-loading .el-loading-spinner .el-loading-dot {
  background-color: #409eff;
}

/* 加载动画优化 */
.global-loading .el-loading-spinner .circular,
.element-loading .el-loading-spinner .circular {
  animation: loading-rotate 2s linear infinite;
}

@keyframes loading-rotate {
  100% {
    transform: rotate(360deg);
  }
}


/* 暗夜模式适配 */
.dark {
  --el-bg-color: #1a1a1a !important;
  --el-bg-color-page: #0a0a0a !important;
  --el-bg-color-overlay: #1d1e1f !important;
  --el-text-color-primary: #e5eaf3 !important;
  --el-text-color-regular: #cfd3dc !important;
  --el-text-color-secondary: #a3a6ad !important;
  --el-border-color: #4c4d4f !important;
  --el-border-color-light: #414243 !important;
  --el-fill-color-blank: #1a1a1a !important;
  --el-fill-color-light: #2b2b2b !important;
}

.dark .el-card {
  background-color: var(--el-bg-color-overlay) !important;
  border-color: var(--el-border-color) !important;
  color: var(--el-text-color-primary) !important;
}

.dark .el-table {
  background-color: var(--el-bg-color-overlay) !important;
  color: var(--el-text-color-primary) !important;
}

.dark .el-table th {
  background-color: var(--el-bg-color) !important;
  color: var(--el-text-color-primary) !important;
  border-bottom-color: var(--el-border-color) !important;
}

.dark .el-table td {
  background-color: var(--el-bg-color-overlay) !important;
  color: var(--el-text-color-primary) !important;
  border-bottom-color: var(--el-border-color) !important;
}

.dark .el-table--striped .el-table__body tr.el-table__row--striped td {
  background-color: var(--el-fill-color-light) !important;
}

.dark .el-menu {
  background-color: var(--el-bg-color) !important;
  border-color: var(--el-border-color) !important;
}

.dark .el-menu-item {
  color: var(--el-text-color-primary) !important;
}

.dark .el-menu-item:hover {
  background-color: var(--el-color-primary) !important;
}

.dark .el-menu-item.is-active {
  background-color: var(--el-color-primary) !important;
  color: #fff !important;
}

.dark .el-sub-menu__title {
  color: var(--el-text-color-primary) !important;
}

.dark .el-sub-menu__title:hover {
  background-color: var(--el-color-primary) !important;
}

.dark .el-header {
  background-color: var(--el-bg-color-overlay) !important;
  border-bottom-color: var(--el-border-color) !important;
}

.dark .el-main {
  background-color: var(--el-bg-color-page) !important;
}

.dark .el-button {
  background-color: var(--el-bg-color-overlay) !important;
  border-color: var(--el-border-color) !important;
  color: var(--el-text-color-primary) !important;
}

.dark .el-button:hover {
  background-color: var(--el-fill-color-light) !important;
}

.dark .el-input__wrapper {
  background-color: var(--el-bg-color-overlay) !important;
  border-color: var(--el-border-color) !important;
}

.dark .el-input__inner {
  color: var(--el-text-color-primary) !important;
}

.dark .el-dropdown-menu {
  background-color: var(--el-bg-color-overlay) !important;
  border-color: var(--el-border-color) !important;
}

.dark .el-dropdown-menu__item {
  color: var(--el-text-color-primary) !important;
}

.dark .el-dropdown-menu__item:hover {
  background-color: var(--el-fill-color-light) !important;
}

.dark .el-breadcrumb__item {
  color: var(--el-text-color-regular) !important;
}

.dark .el-breadcrumb__inner {
  color: var(--el-text-color-regular) !important;
}

.dark .el-breadcrumb__inner:hover {
  color: var(--el-color-primary) !important;
}

.dark .el-breadcrumb__item:last-child .el-breadcrumb__inner {
  color: var(--el-text-color-primary) !important;
}

.dark .el-tag {
  background-color: var(--el-bg-color-overlay) !important;
  border-color: var(--el-border-color) !important;
  color: var(--el-text-color-primary) !important;
}

.dark .el-select-dropdown {
  background-color: var(--el-bg-color-overlay) !important;
  border-color: var(--el-border-color) !important;
}

.dark .el-select-dropdown__item {
  color: var(--el-text-color-primary) !important;
}

.dark .el-select-dropdown__item:hover {
  background-color: var(--el-fill-color-light) !important;
}

.dark .el-select-dropdown__item.selected {
  background-color: var(--el-color-primary) !important;
  color: #fff !important;
}

.dark .el-switch__core {
  background-color: var(--el-border-color) !important;
}

.dark .el-switch.is-checked .el-switch__core {
  background-color: var(--el-color-primary) !important;
}

.dark .el-drawer {
  background-color: var(--el-bg-color-overlay) !important;
}

.dark .el-drawer__header {
  background-color: var(--el-bg-color-overlay) !important;
  border-bottom-color: var(--el-border-color) !important;
  color: var(--el-text-color-primary) !important;
}

.dark .el-drawer__body {
  background-color: var(--el-bg-color-overlay) !important;
  color: var(--el-text-color-primary) !important;
}
